'''
Created on Apr 6, 2012

@author: daoxuandung
'''

from web.base import BaseHandler
from web import urls
from entity.entity import Location

class CreateHandler(BaseHandler):

    def post(self):
        newLocation = Location()
        newLocation.city = self.request.params.get("city")
        newLocation.city = self.request.params.get("country")
        newLocation.latitude = self.request.params.get("latitude")
        newLocation.longitude = self.request.params.get("longitude")
        newLocation.postal_code = self.request.params.get("postal_code")
        newLocation.state = self.request.params.get("state")
        newLocation.street = self.request.params.get("street")
        newLocation.put()
    

class ReadHandler(BaseHandler):
    def get(self):
        pass
    

class UpdateHandler(BaseHandler):
    def post(self):
        pass
    

class DeleteHandler(BaseHandler):
    def post(self):
        pass    


app = urls.app

def main():
    app.run()

if __name__ == '__main__':
    main()